<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta
        name="viewport"
        content="width=device-width, initial-scale=1.0"
    >
    <title>promise最常见的写法</title>
</head>


<body>
    <script>
        new Promise((resolve, reject) => {

        }).then((val) => {
            // 成功时候执行
            console.log(val)
        }).catch((err) => {
            // 失败之后执行
            console.log(err)
        })
    </script>
</body>

</html>